package com.jzo2o.customer.controller.worker;

import com.jzo2o.customer.model.dto.request.WorkerCertificationAuditAddReqDTO;
import com.jzo2o.customer.model.dto.response.RejectReasonResDTO;
import com.jzo2o.customer.service.IWorkerCertificationService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @author wanfeng
 * @version 1.0
 * @since 2025-09-16 17:12
 */

@RestController("workerServeWorkerCertificationAuditController")
@RequestMapping("/worker/worker-certification-audit")
@Api(tags = "服务端 - 服务提交认证相关接口")
public class ServeWorkerCertificationAuditController {
    @Resource
    private IWorkerCertificationService workerCertificationService;

    /**
     * 服务提交认证相关接口
     * @param workerCertificationAuditAddReqDTO
     */
    @PostMapping
    @ApiOperation("服务提交认证相关接口")
    public void certificationAudit(@RequestBody WorkerCertificationAuditAddReqDTO workerCertificationAuditAddReqDTO){
        workerCertificationService.certificationAudit(workerCertificationAuditAddReqDTO);
    }

    /**
     * 查询最新的驳回原因接口
     * @return
     */
    @GetMapping("/rejectReason")
    @ApiOperation("查询最新的驳回原因接口")
    public RejectReasonResDTO rejectReason(){
        return workerCertificationService.rejectReason();
    }
}
